package com.test.designPattern.ch1;

public class ShapeFactory {

    public Shape getShape(String shapeType){
        if("rectangle".equalsIgnoreCase(shapeType)){
            return new Rectangle();
        } else if("circle".equalsIgnoreCase(shapeType)){
            return new Circle();
        } else if("square".equalsIgnoreCase(shapeType)){
            return new Square();
        }
        return null;
    }

}
